algebraic data types - определение. Что такое algebraic data types
Diclib.com
Словарь онлайн

Что (кто) такое algebraic data types - определение

IN COMPUTER PROGRAMMING, A TYPE FORMED BY COMBINING OTHER TYPES
Algebraic data types; Algebraic datatype; Algebraic datatypes; Algebraic type; Algebraic types; Data constructor; Algebraic Data Type; List of programming languages with algebraic data types

algebraic data type         
<programming> (Or "sum of products type") In {functional programming}, new types can be defined, each of which has one or more constructors. Such a type is known as an algebraic data type. E.g. in Haskell we can define a new type, "Tree": data Tree = Empty | Leaf Int | Node Tree Tree with constructors "Empty", "Leaf" and "Node". The constructors can be used much like functions in that they can be (partially) applied to arguments of the appropriate type. For example, the Leaf constructor has the functional type Int -> Tree. A constructor application cannot be reduced (evaluated) like a function application though since it is already in {normal form}. Functions which operate on algebraic data types can be defined using pattern matching: depth :: Tree -> Int depth Empty = 0 depth (Leaf n) = 1 depth (Node l r) = 1 + max (depth l) (depth r) The most common algebraic data type is the list which has constructors Nil and Cons, written in Haskell using the special syntax "[]" for Nil and infix ":" for Cons. Special cases of algebraic types are product types (only one constructor) and enumeration types (many constructors with no arguments). Algebraic types are one kind of {constructed type} (i.e. a type formed by combining other types). An algebraic data type may also be an abstract data type (ADT) if it is exported from a module without its constructors. Objects of such a type can only be manipulated using functions defined in the same module as the type itself. In set theory the equivalent of an algebraic data type is a discriminated union - a set whose elements consist of a tag (equivalent to a constructor) and an object of a type corresponding to the tag (equivalent to the constructor arguments). (1994-11-23)
Generalized algebraic data type         
Generalized Algebraic Data Types; GADT; Generalized algebraic data types; GADTs; First-class phantom types; Guarded recursive data types; Generalized algebraic datatypes; Generalized Algebraic Data Type; Generalized algebraic datatype; Equality-qualified type; Equality qualified type; First-class phantom type; First class phantom type; Guarded recursive datatype; Guarded recursive data type; Generalized abstract data type; Generalized Abstract Data Type
In functional programming, a generalized algebraic data type (GADT, also first-class phantom type, guarded recursive datatype, or equality-qualified type) is a generalization of parametric algebraic data types.
Algebraic extension         
FIELD EXTENSION VIA ADJOINING SOLUTIONS TO POLYNOMIALS WITH COEFFICIENTS IN THE SUBFIELD
Algebraic extension of a field; Algebraic field extension; Relative algebraic closure; Algebraic extension field
In mathematics, an algebraic extension is a field extension such that every element of the larger field is algebraic over the smaller field ; that is, if every element of is a root of a non-zero polynomial with coefficients in .Fraleigh (2014), Definition 31.

Википедия

Algebraic data type

In computer programming, especially functional programming and type theory, an algebraic data type (ADT) is a kind of composite type, i.e., a type formed by combining other types.

Two common classes of algebraic types are product types (i.e., tuples and records) and sum types (i.e., tagged or disjoint unions, coproduct types or variant types).

The values of a product type typically contain several values, called fields. All values of that type have the same combination of field types. The set of all possible values of a product type is the set-theoretic product, i.e., the Cartesian product, of the sets of all possible values of its field types.

The values of a sum type are typically grouped into several classes, called variants. A value of a variant type is usually created with a quasi-functional entity called a constructor. Each variant has its own constructor, which takes a specified number of arguments with specified types. The set of all possible values of a sum type is the set-theoretic sum, i.e., the disjoint union, of the sets of all possible values of its variants. Enumerated types are a special case of sum types in which the constructors take no arguments, as exactly one value is defined for each constructor.

Values of algebraic types are analyzed with pattern matching, which identifies a value by its constructor or field names and extracts the data it contains.

Algebraic data types were introduced in Hope, a small functional programming language developed in the 1970s at the University of Edinburgh.